<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: external_interface.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">external_interface.c File Reference</div>  </div>
</div>
<div class="contents">

<p>High level external user interface (USB).  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="external__interface_8h_source.html">external_interface.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="control__tables_8h_source.html">control_tables.h</a>&quot;</code><br/>
<code>#include &quot;conf_usb.h&quot;</code><br/>
<code>#include &quot;udd.h&quot;</code><br/>
<code>#include &quot;udc.h&quot;</code><br/>
<code>#include &quot;udi_cdc.h&quot;</code><br/>
<code>#include &quot;usbc_device.h&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><b>rxtx_buffer</b></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive and transmit buffer. <br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#ab0b7565efe6045bdf8da57c2824308e2">CHECKSUM_BYTES</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#aab204372f31ec0358765c2e72639fbbd">HEADER_BYTES</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a0ad0666a1726541270e5b2a3594f242c">MAX_COMMAND_ARGS</a>&#160;&#160;&#160;10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a85ee2537246c608f7869fd334744e7a2">NO_EXPECTED_BYTES</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a0476a858145c6a1c65bcbcf1aba36658">SINGLE_BYTE_EXPECTED</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#aeb6e0eb56e05a6f98329c4176732ade0">USB_TIMEOUT_COUNT</a>&#160;&#160;&#160;200000000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#ac5a15380349cdf6021cc71c6ff3a94fd">NO_INITIATED_TRANSMISSION</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#acfa667889e35d0fbd78d7715d6e13784">COUNTER_RESET_VALUE</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a95fd3f70cf5c50ee3e0d917496b6f204">NO_BYTES_RECEIVED_YET</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#aebff9f5f6164c79d9fe98bc66f068dce">STATE_OUTPUT_HEADER</a>&#160;&#160;&#160;0xAA</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#ab64b9b0e54ed62e2093f9b170cff8f4b">receive_limit_not_reached</a>(rx_nrb_counter)&#160;&#160;&#160;((rx_nrb_counter)&lt;MAX_RX_NRB)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a315ae12e6f397325554618c1eecc488d">reset_timer</a>(timer)&#160;&#160;&#160;((timer) = Get_system_register(AVR32_COUNT))</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a7b2aea1a29fa2b5e05aafaefebe8b534">is_new_header</a>(exp_nrb)&#160;&#160;&#160;((exp_nrb) == NO_EXPECTED_BYTES)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a71e04660769623e038e129e3d09815bb">is_end_of_command</a>(exp_nrb)&#160;&#160;&#160;(exp_nrb) == SINGLE_BYTE_EXPECTED</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a92cbfd9df581c1c96c978137f9ae85e9">has_timed_out</a>(timeout_counter, exp_nrb)&#160;&#160;&#160;((timeout_counter) + USB_TIMEOUT_COUNT &lt; Get_system_register(AVR32_COUNT) &amp;&amp; (exp_nrb) &gt; 0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a9fab502e54b472d27148f709b5327b87">increment_counter</a>(counter)&#160;&#160;&#160;((counter)++)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a04ff3f72917b938ba22fa386e25e39dd">decrement_counter</a>(counter)&#160;&#160;&#160;((counter)--)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#a2094d35bac01c6011ec3aac7891041db">FIRST_PAYLOAD_BYTE</a>&#160;&#160;&#160;(state_output_header_p+2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="external__interface_8c.html#ad6a64f7bdea946fc03f79f174e90a6b2">PAYLOAD_SIZE_BYTE</a>&#160;&#160;&#160;(state_output_header_p+1)</td></tr>
<tr><td colspan="2"><div class="groupHeader">Buffer settings</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga739a2a1a0047c98ac1b18ecd25dac092">RX_BUFFER_SIZE</a>&#160;&#160;&#160;20</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga9ab33647617098646990fe263600b650">TX_BUFFER_SIZE</a>&#160;&#160;&#160;60</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga0846b13f494cb412b27a5d30d2e227e6">SINGLE_TX_BUFFER_SIZE</a>&#160;&#160;&#160;10</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga36568984b1040a53e0d7d64d67066de4">MAX_RX_NRB</a>&#160;&#160;&#160;10</td></tr>
<tr><td colspan="2"><div class="groupHeader">State output divider limits</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga9f7db6d016bae1297a6e75263dd6d186">MAX_LOG2_DIVIDER</a>&#160;&#160;&#160;14</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#gabef3d4b97cf2ed7d11401dafdd3fb6ea">MIN_LOG2_DIVIDER</a>&#160;&#160;&#160;0</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga87a9b575684eea3d1a804e597236b40f">com_interface_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function for communication interface.  <a href="group__user__interface.html#ga87a9b575684eea3d1a804e597236b40f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga328bb6c7a4ed590a8a4eb1b2a60943f1">receive_command</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function for receiving commands from user.  <a href="group__user__interface.html#ga328bb6c7a4ed590a8a4eb1b2a60943f1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga9926a12daaecdbb4d8106ed110510d49">transmit_data</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function to output data to user.  <a href="group__user__interface.html#ga9926a12daaecdbb4d8106ed110510d49"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga56ca2a8f03cbdf960d6928e9a7ad68ba">set_state_output</a> (uint8_t state_id, uint8_t divider)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets state_id state to be output with interrupt frequency divided by 2^(divider-1). Divider=0 turns off output.  <a href="group__user__interface.html#ga56ca2a8f03cbdf960d6928e9a7ad68ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#gad8c48701618a71f6bcc9ec12d139ba32">reset_output_counters</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the output counter such that the output become synchronized.  <a href="group__user__interface.html#gad8c48701618a71f6bcc9ec12d139ba32"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__user__interface.html#ga3f996476795917a4b1ace8c6c5e4b28a">error_signal</a> = 0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Error signaling vector. If zero no error has occurred.  <a href="group__user__interface.html#ga3f996476795917a4b1ace8c6c5e4b28a"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">State output rate control variables</div></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>High level external user interface (USB). </p>
<p>This file contains the functions for 1) receiving and parsing commands and executing commands responses 2) determining what to transmit and to transmit data to the system user via USB.</p>
<dl class="author"><dt><b>Authors:</b></dt><dd>John-Olof Nilsson, Isaac Skog </dd></dl>
<dl class="copyright"><dt><b>Copyright:</b></dt><dd>Copyright (c) 2011 OpenShoe, ISC License (open source) </dd></dl>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="ab0b7565efe6045bdf8da57c2824308e2"></a><!-- doxytag: member="external_interface.c::CHECKSUM_BYTES" ref="ab0b7565efe6045bdf8da57c2824308e2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECKSUM_BYTES&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="acfa667889e35d0fbd78d7715d6e13784"></a><!-- doxytag: member="external_interface.c::COUNTER_RESET_VALUE" ref="acfa667889e35d0fbd78d7715d6e13784" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COUNTER_RESET_VALUE&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a04ff3f72917b938ba22fa386e25e39dd"></a><!-- doxytag: member="external_interface.c::decrement_counter" ref="a04ff3f72917b938ba22fa386e25e39dd" args="(counter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define decrement_counter</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">counter</td><td>)</td>
          <td>&#160;&#160;&#160;((counter)--)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a2094d35bac01c6011ec3aac7891041db"></a><!-- doxytag: member="external_interface.c::FIRST_PAYLOAD_BYTE" ref="a2094d35bac01c6011ec3aac7891041db" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FIRST_PAYLOAD_BYTE&#160;&#160;&#160;(state_output_header_p+2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a92cbfd9df581c1c96c978137f9ae85e9"></a><!-- doxytag: member="external_interface.c::has_timed_out" ref="a92cbfd9df581c1c96c978137f9ae85e9" args="(timeout_counter, exp_nrb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define has_timed_out</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timeout_counter, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">exp_nrb&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((timeout_counter) + USB_TIMEOUT_COUNT &lt; Get_system_register(AVR32_COUNT) &amp;&amp; (exp_nrb) &gt; 0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aab204372f31ec0358765c2e72639fbbd"></a><!-- doxytag: member="external_interface.c::HEADER_BYTES" ref="aab204372f31ec0358765c2e72639fbbd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HEADER_BYTES&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9fab502e54b472d27148f709b5327b87"></a><!-- doxytag: member="external_interface.c::increment_counter" ref="a9fab502e54b472d27148f709b5327b87" args="(counter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define increment_counter</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">counter</td><td>)</td>
          <td>&#160;&#160;&#160;((counter)++)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a71e04660769623e038e129e3d09815bb"></a><!-- doxytag: member="external_interface.c::is_end_of_command" ref="a71e04660769623e038e129e3d09815bb" args="(exp_nrb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define is_end_of_command</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">exp_nrb</td><td>)</td>
          <td>&#160;&#160;&#160;(exp_nrb) == SINGLE_BYTE_EXPECTED</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a7b2aea1a29fa2b5e05aafaefebe8b534"></a><!-- doxytag: member="external_interface.c::is_new_header" ref="a7b2aea1a29fa2b5e05aafaefebe8b534" args="(exp_nrb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define is_new_header</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">exp_nrb</td><td>)</td>
          <td>&#160;&#160;&#160;((exp_nrb) == NO_EXPECTED_BYTES)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a0ad0666a1726541270e5b2a3594f242c"></a><!-- doxytag: member="external_interface.c::MAX_COMMAND_ARGS" ref="a0ad0666a1726541270e5b2a3594f242c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_COMMAND_ARGS&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a95fd3f70cf5c50ee3e0d917496b6f204"></a><!-- doxytag: member="external_interface.c::NO_BYTES_RECEIVED_YET" ref="a95fd3f70cf5c50ee3e0d917496b6f204" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NO_BYTES_RECEIVED_YET&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a85ee2537246c608f7869fd334744e7a2"></a><!-- doxytag: member="external_interface.c::NO_EXPECTED_BYTES" ref="a85ee2537246c608f7869fd334744e7a2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NO_EXPECTED_BYTES&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ac5a15380349cdf6021cc71c6ff3a94fd"></a><!-- doxytag: member="external_interface.c::NO_INITIATED_TRANSMISSION" ref="ac5a15380349cdf6021cc71c6ff3a94fd" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NO_INITIATED_TRANSMISSION&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ad6a64f7bdea946fc03f79f174e90a6b2"></a><!-- doxytag: member="external_interface.c::PAYLOAD_SIZE_BYTE" ref="ad6a64f7bdea946fc03f79f174e90a6b2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PAYLOAD_SIZE_BYTE&#160;&#160;&#160;(state_output_header_p+1)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab64b9b0e54ed62e2093f9b170cff8f4b"></a><!-- doxytag: member="external_interface.c::receive_limit_not_reached" ref="ab64b9b0e54ed62e2093f9b170cff8f4b" args="(rx_nrb_counter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define receive_limit_not_reached</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">rx_nrb_counter</td><td>)</td>
          <td>&#160;&#160;&#160;((rx_nrb_counter)&lt;MAX_RX_NRB)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a315ae12e6f397325554618c1eecc488d"></a><!-- doxytag: member="external_interface.c::reset_timer" ref="a315ae12e6f397325554618c1eecc488d" args="(timer)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define reset_timer</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">timer</td><td>)</td>
          <td>&#160;&#160;&#160;((timer) = Get_system_register(AVR32_COUNT))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a0476a858145c6a1c65bcbcf1aba36658"></a><!-- doxytag: member="external_interface.c::SINGLE_BYTE_EXPECTED" ref="a0476a858145c6a1c65bcbcf1aba36658" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SINGLE_BYTE_EXPECTED&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aebff9f5f6164c79d9fe98bc66f068dce"></a><!-- doxytag: member="external_interface.c::STATE_OUTPUT_HEADER" ref="aebff9f5f6164c79d9fe98bc66f068dce" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define STATE_OUTPUT_HEADER&#160;&#160;&#160;0xAA</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aeb6e0eb56e05a6f98329c4176732ade0"></a><!-- doxytag: member="external_interface.c::USB_TIMEOUT_COUNT" ref="aeb6e0eb56e05a6f98329c4176732ade0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define USB_TIMEOUT_COUNT&#160;&#160;&#160;200000000</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Dec 20 2011 12:12:36 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
